home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 146
/
(Vol 146) Jan 07 2012.iso
/
Games
/
super_fly.swf
/
scripts
/
DefineSprite_86
/
frame_7
/
DoAction.as
Wrap
Text File
|
2012-01-07
|
755b
|
39 lines
theTime = getTimer();
tPassed = theTime - MoveStart;
if("0" < tPassed)
{
pt1 = tPassed / moveTime;
pt2 = pt1 * pt1;
pt3 = pt2 * pt1;
xNP = xL1;
xModPoint = dcx * pt1;
xNP += xModPoint;
xModPoint = dbx * pt2;
xNP += xModPoint;
xModPoint = dax * pt3;
xNP += xModPoint;
yNP = yL1;
yModPoint = dcy * pt1;
yNP += yModPoint;
yModPoint = dby * pt2;
yNP += yModPoint;
yModPoint = day * pt3;
yNP += yModPoint;
if(xNP < getProperty("fly1", _X))
{
tellTarget("fly1")
{
gotoAndStop(2);
}
}
else
{
tellTarget("fly1")
{
gotoAndStop(1);
}
}
setProperty("fly1", _X, xNP);
setProperty("fly1", _Y, yNP);
}